package team.nmsg.ge.system.util;

import java.util.Properties;

import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSenderImpl;

public class TestUtil {
	
	
	
	
	public static void main(String[] args) {
		
		Properties javaMailProperties = new Properties();
		javaMailProperties.put("mail.smtp.auth", "true");
//		javaMailProperties.put("mail.smtp.starttls.enable", "true");
		javaMailProperties.put("mail.smtp.starttls.required", "true");
		JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
		mailSender.setJavaMailProperties(javaMailProperties );
		
		mailSender.setProtocol("smtp");
		mailSender.setPort(587);
		mailSender.setHost("mail.denimventure.com");
		mailSender.setUsername("it@denimventure.com");
		mailSender.setPassword("itdenimventure2018");
		
		
		
		SimpleMailMessage message = new SimpleMailMessage();
		message.setFrom("it@denimventure.com");
		message.setTo("guodeqi@bdcom.com.cn");
		message.setSubject("主题：简单邮件");
		message.setText("测试邮件内容");
		mailSender.send(message);

	}
	
	
	
	
}
